DEV = usb
obj-m += $(DEV).o

OBJ_DIR = /work/nfsroot/

KERN_DIR = /home/coco/comeOnBaby/learn_embed/linux_used

all:
	make -C $(KERN_DIR) M=`pwd` modules

clean:
	make -C $(KERN_DIR) M=`pwd` modules clean
	rm -rf modules.order

cp:
	cp $(DEV).ko $(OBJ_DIR)	

TGT := main
C_SRCS := main.c

CROSS_COMPILER_PREFIX := arm-linux-
CC := $(CROSS_COMPILER_PREFIX)gcc

$(TGT): $(C_SRCS)
	$(CC) -o $(TGT) $^

$(TGT)clean:
	rm -rf $(TGT)

$(TGT)cp:
	cp $(TGT) $(OBJ_DIR)
